import request from '@/utils/request'

function queryAllServiceCount() {
  return request({
    url: '/monitor_api/summary/queryAllServiceCount',
    method: 'get'
  })
}

function queryAllService(params) {
  return request({
    url: '/monitor_api/summary/queryAllService',
    method: 'get',
    params
  })
}

// function selAllUtilization(data) {
//   return request({
//     url: '/monitor_api/summary/selAllUtilization',
//     method: 'post',
//     data
//   })
// }

// function queryOverviewServiceRealTime(data) {
//   return request({
//     url: 'monitor_api/summary/queryOverviewServiceRealTime',
//     method: 'post',
//     data
//   })
// }

// function selCombinedTaskCount(data) {
//   return request({
//     url: 'monitor_api/summary/selCombinedTaskCount',
//     method: 'post',
//     data
//   })
// }

function monitorStatusInquiry() {
  return request({
    url: '/monitor_api/summary/monitorStatusInquiry',
    method: 'get'
  })
}

function homePage(params) {
  return request({
    url: '/monitor_api/summary/homePage',
    method: 'get',
    params
  })
}

function queryAllHost(params) {
  return request({
    url: '/monitor_api/summary/queryAllHost',
    method: 'get',
    params
  })
}

function queryRoleStatePage(params) {
  return request({
    url: '/monitor_api/summary/queryRoleStatePage',
    method: 'get',
    params
  })
}

function queryAllServiceSum(params) {
  return request({
    url: '/monitor_api/summary/queryAllService',
    method: 'get',
    params
  })
}

function cpuUsed(params) {
  return request({
    url: '/monitor_api/summary/cpuUsed',
    method: 'get',
    params
  })
}

function cpuDistribution(params) {
  return request({
    url: '/monitor_api/summary/cpuDistribution',
    method: 'get',
    params
  })
}

function memoryUsed(params) {
  return request({
    url: '/monitor_api/summary/memoryUsed',
    method: 'get',
    params
  })
}

function memoryDistribution(params) {
  return request({
    url: '/monitor_api/summary/memoryDistribution',
    method: 'get',
    params
  })
}

function hdfsUsed(params) {
  return request({
    url: '/monitor_api/summary/hdfsUsed',
    method: 'get',
    params
  })
}
function cmResourceBasicData(params) {
  return request({
    url: '/monitor_api/summary/cmResourceBasicData',
    method: 'get',
    params
  })
}

export default {
  queryAllServiceCount, queryAllService, monitorStatusInquiry, homePage, queryAllHost, queryRoleStatePage, queryAllServiceSum, cpuUsed, cpuDistribution, memoryUsed, memoryDistribution, hdfsUsed, cmResourceBasicData
}
